<!DOCTYPE html>
<html lang="zh-cn">
	<% include head.html %>
<body>
	<% include top.html %>
	<div class="container">
		<ul class="bread">
			<li>
				<a href="/admin" class="icon-home">首页</a>
			</li>
			<li>
				<a href="/admin/content">内容</a>
			</li>
		</ul>
		<div class="admin">
			<div class="line-big">
				<div class="xm12">
					<form method="post" action="/admin/content/delete">
						<div class="panel admin-panel">
							<div class="panel-head"> <strong>内容管理</strong>
							</div>
							<div class="padding border-bottom">
								<input type="button" class="button button-small checkall" name="checkall" checkfor="id" value="全选">
								<a class="button button-small border-green" href="/admin/content/add">添加文章</a>
								<input type="submit" class="button button-small border-yellow" onclick="return confirm(&quot;确认删除?&quot;)?!0:!1" value="批量删除">
							<table class="table table-hover">
								<tbody>
									<tr>
										<th width="60">选择</th>
										<th width="120">ID</th>
										<th width="120">作者</th>
										<th width="*">名称</th>
										<th width="180">时间</th>
										<th width="100">操作</th>
									</tr>
									<% list['data'].forEach(function(v) { %>
									<tr>
										<td>
											<input type="checkbox" name="id" value="<%=v.id%>"></td>
										<td>
											<%=v.id%></td>
										<td>
											<%=v.user%></td>
										<td>
											<%=v.title%></td>
										<td>
											<%=v.time%></td>
										<td>
											<a class="button border-blue button-little" href="/admin/content/add/id/<%=v.id%>">修改</a>
											<a class="button border-yellow button-little" href="/admin/content/delete/id/<%=v.id%>" onclick="return confirm(&quot;确认删除?&quot;)?!0:!1">删除</a>
										</td>
									</tr>
									<% }) %></tbody>
							</table>
							<div class="panel-foot text-center">
								<ul class="pagination border-main">
									<% if(list.totalPages>1){ 
									for(var i=1;i<list.totalPages+1;i++){%>
										<li class="<%if(list.currentPage==i){%>
											active
											<%}%>
											">
											<a href="/admin/content/index/p/<%=i%>">
												<%=i%></a>
										</li>
										<%}}%></ul>
								</div>
							</div>
						</form>
					</div>
				</div>
			</div>
		</div>
		<% include foot.html %></body>
	</html>